﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Hutech.Authentication.Library.Business.WebHelpers;

namespace Hutech.CRM.Web.Controls
{
    public partial class MenuLeft : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                SetPermission();
        }

        protected void SetPermission()
        {
            liThongBaoMoi.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewNewNotice"); 
            //liQuanLyMonHoc.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewSubjectManage"); 
            //liDuLieuGiangDay.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewInfoTeachingManager"); 
            //liDuLieuThanhToanKhac.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewOtherTeachingManager"); 
            //liImportDuLieu.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewImportManager"); 
            //liBaoCaoThongKe.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewReportManager"); 
            //liCaiDat.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewSettingManager"); 
            liQuanTri.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewAdminManager"); 
            //liUpdateDuLieu.Visible = WebUser.IsAdmin == true ? true : WebUser.isPermission("viewUpdateDataManager"); 
        }
    }
}